public class MethodDemo3 {
//   public static int add(int n1, int n2) {
//        return 0;
//    }

    public static double area(double a,double b,boolean flag){
        if (flag)
        return a*b;
        else
            return a*b/2;
    }
    public  static double area(double r){
        return 3.14*r*r;
    }
//    public static double area3(double a,double b){
//        return a*b/2;
//    }
    public static void main(String[] args) {
        double area,area2,area3;
        area=area(2.0,6.0,true);
        area2=area(3.0);

        System.out.println(area);
        System.out.println(area2);

    }
}
